import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)


const routes = [
  {
    path: '/',
    component: () => import('./views/nodeList.vue'),
    children: [
      {
        path: ':tab',
        component: () => import('./views/List.vue')
      }
    ]
  }, {
    name: 'topic',
    path: '/topic/:id',
    component: () => import('./views/nodeDetail.vue')
  }
]

export default new Router({
  // mode: 'history',
  base: process.env.BASE_URL,
  linkExactActiveClass: 'active',
  routes
})
